icontheme: search first in all themes if the requested icon is symbolic
authorCosimo Cecchi <cosimoc@gnome.org>
Wed, 25 Apr 2012 01:47:33 +0000 (21:47 -0400)
committerCosimo Cecchi <cosimoc@gnome.org>
Thu, 26 Apr 2012 17:52:01 +0000 (13:52 -0400)
commit271adacfadfdd81b27fb12356fe20cde3094de37
treefe8060b83d1d601d44b76de359b8f87a8d35748f
parent7e917e54a348b5512379ec2a9e21882475e098a5
icontheme: search first in all themes if the requested icon is symbolic

Symbolic icons use a "-symbolic" suffix to distinguish themselves from
highcolor variants. Note that the dash character here has a different
meaning than the specificity level defined in the icon-naming-spec [1],
as it identifies a property of the icon itself.

Since they might be provided by a parent theme (e.g. the HighContrast theme
relies on the gnome icon theme for them), when we are looking up one we
should first escape the generic icon inheritance mechanism defined in the
icon-naming-spec [1], and privilege a symbolic icon, if it exists in a
parent theme, before applying the inheritance evaluation.

This fixes symbolic icons not working properly when used in the
HighContrast theme with the GTK_ICON_LOOKUP_GENERIC_FALLBACK flag set.

[1]
http://standards.freedesktop.org/icon-naming-spec/latest/ar01s03.html

https://bugzilla.gnome.org/show_bug.cgi?id=674806
gtk/gtkicontheme.c